<script>
class Person {
  constructor(name, age) {
    this.name = name;
    this.age = age;
  }
  say() {
    console.log('Hello')
  }
}

// 把父类的所有的属性和方法都继承过来了
class Star extends Person {}

const s = new Star('王思聪', 20, 10000)
console.log(s)
</script>